package org.rjb.dao;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.shop.technicalservice.dao.role.RolesDao;
import com.shop.technicalservice.model.role.Roles;

public class RolesDAOTest extends TestCase {
	private RolesDao rd;

	public void setUp(){
		System.out.println("Begin Test");
		ApplicationContext ac=new ClassPathXmlApplicationContext(new String [] {"context/spring-db.xml","context/spring-dao.xml"});
		rd=(RolesDao)ac.getBean("rolesDao");
	}
	public void tearDown(){
		System.out.println("End Test");
	}
	public void testSave() throws Exception{
		Roles r=new Roles();
		r.setRoleName("ssss");
		
		Roles rs=rd.save(r);
		Assert.assertTrue(rs.getSequenceId()>0);
	}
	public void testDelete(){
		
	}
	public void testFindAll(){
		
	}
	public void testMerge(){
		
	}
}
